A successive approximation ADC (Analog to Digital Converter) receives an input reference voltage in a capacitor DAC (Digital to Analog Converter), compares the set voltage of the capacitor DAC and the input voltage, and controls the capacitor DAC so that the both voltages approximate to each other the most, thereby converting the input voltage into a digital code.
The capacitor DAC includes a plurality of capacitor banks (capacitor array). Based on the set voltage of each capacitor bank, a threshold value thereof is set; based on this threshold value, bit detection is performed. Therefore, when the set voltage is varied, the threshold value is also varied, which results in a problem in that this variation in threshold value causes an error in conversion result (digital code). The factors that vary the set voltage include variation in each capacitor included in the capacitor DAC, variation in reference voltage when a plurality of reference voltages is used, and the like.